package com.ztesoft.huangfu.learning.springboot.springbootvalidate.entity;

import com.ztesoft.huangfu.learning.springboot.springbootvalidate.groups.Groups;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created with IntelliJ IDEA.
 * Author: huangfu.daohui
 * Date: 2018/6/8
 * Time: 22:00
 * Version: 1.0
 * Description:
 **/
public class User {
    @NotNull(message = "id 不能为空", groups = Groups.Update.class)
    private Integer id;

    @NotNull(message = "name 不能为空", groups = Groups.Default.class)
    private String name;

    @NotNull(message = "age 不能为空", groups = Groups.Default.class)
    private String age;
}
